package com.xmutca.demo.consumer;

import com.alibaba.dubbo.config.annotation.Reference;
import com.xmutca.core.common.Receipt;
import com.xmutca.demo.api.Demo;
import com.xmutca.demo.api.service.DemoService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author: 彭伟煌(pengweihuang@xmutca.com)
 * @create: 2016-07-12 23:10
 */
@Controller
@RequestMapping
public class DemoController {

    @Reference
    private DemoService demoService;

    @ResponseBody
    @RequestMapping
    public Receipt test() {
        Demo demo = new Demo();
        return demoService.test(demo);
    }
}
